DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Write Method / Write(Byte[],String) Method

Byte Array to write image data to

Specifies the full UID of the transfer syntax with which the data is to be saved when Part 10 format is used. If omitted, the little-endian explicit VR transfer syntax is used. For details of the currently supported syntaxes, see the page

Example

In This Topic
    Write(Byte[],String) Method
    In This Topic
    Write the image data to a Byte Array with specified transfer syntax
    Syntax
    'Declaration
     
    
    Public Overloads Sub Write( _
       ByRef Array() As System.Byte, _
       ByVal TransferSyntax As System.String _
    ) 
    public void Write( 
       out System.byte[] Array,
       System.string TransferSyntax
    )

    Parameters

    Array

    Byte Array to write image data to

    TransferSyntax

    Specifies the full UID of the transfer syntax with which the data is to be saved when Part 10 format is used. If omitted, the little-endian explicit VR transfer syntax is used. For details of the currently supported syntaxes, see the page

    Remarks
    Data may be read back by the corresponding Read method.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    byte[] dicomData;
    string transferSyntax = TransferSyntaxes.ExplicitVRLittleEndian;
    image.Write(out dicomData, transferSyntax);
                        
    // Example: Write byte data to a DICOM file
    File.WriteAllBytes("output_image.dcm", dicomData);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also